package erp.education.server.db.implementation.erp.project;

 

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

import erp.education.server.db.entites.setup.school.Schools;
import erp.education.server.db.implementation.common.BaseDAO;
import erp.education.server.db.interfaces.erp.project.ModuleDAOI;
@Component("moduleDao")
public class ModuleDAO extends BaseDAO implements ModuleDAOI {

	@Override
	public Schools getModule(Long moduleId) {
		// TODO Auto-generated method stub
		Schools module=null;
		Map params=new HashMap();
		params.put("moduleId", moduleId);
		
		module=(Schools)getSingleResult("select module from Modules module where module.moduleId=:moduleId ", params);
	 
		 
		 
		return module;
	}
	@Override
	public List<Schools> getModules() {
		// TODO Auto-generated method stub
		List<Schools> modules=null;
		Map params=new HashMap();
		modules=(List<Schools>) getResultList("select module from Modules module  ", params);
			return modules;
	}
}
